import request from "../axios";

import { requestHandle } from "../axios";

import { Toast } from 'antd-mobile';
import { R, API_PREFIX } from "@/assets/js/dict.js"

/*
* 消息相关接口
* */


///////////////////////////////////家教消息 -start////////////////////////////

/**
 * 家教消息列表
 */
export function listMsgOfTutor (params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/tutor/action/listMsg`,
        method: 'get',
        params
    }), call)
}

/**
 * 查询家教未读的消息数量
 */
export function countNewMsgOfTutor (params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/tutor/action/countNewMsg`,
        method: 'get',
        params
    }), call)
}

/*
* 家教消息详情
* */
export function detailsMsgOfTutor (params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/tutor/action/detailsMsg`,
        method: 'get',
        params
    }), call)
}



///////////////////////////////////家教消息 -end////////////////////////////




///////////////////////////////////家长消息 -start////////////////////////////

/*
* 家长消息列表
* */
export function listMsgOfParent (params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/listMsg`,
        method: 'get',
        params
    }), call)
}

/*
* 家长消息详情
* */
export function detailsMsgOfParent (params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/detailsMsg`,
        method: 'get',
        params
    }), call)
}



///////////////////////////////////家长消息 -end////////////////////////////